import React from 'react'
import Space from "components/space";
import { Button } from 'antd';

export default {
  key: 'space',
  name: 'Space 间距',
  author: '吴程龙',
  description: '用于调整元素内的间距。',
  isExampleFull: true,
  api: [
    {
      title: 'API',
      data: [
        { param: 'size', description: '描述间距的大小', type: 'string|number', defaultValue: 'small' },
        { param: 'direction', description: '描述间距的方向', type: 'vertical|horizontal', defaultValue: 'horizontal' }
      ],
      description: '::small::是8（大多表现在水平间距）,::middle::12（大多表现为垂直间距）,::large::20（大多变现为段落的间距）'
    }
  ],
  example: [
    {
      title: '基础用法',
      description: '包裹在需要加间距的元素即可',
      state: {

      },
      getMethod: context => {
        return {

        }
      },
      getContent: context => (
        <Space>
          <Button>1</Button>
          <Button>2</Button>
          <Button>3</Button>
          <Button>4</Button>
        </Space>
      )
    },
    {
      title: '调整高度',
      description: '包裹在需要加间距的元素即可',
      state: {

      },
      getMethod: context => {
        return {

        }
      },
      getContent: context => (
        <Space size={10} direction={'vertical'}>
          <Button>1</Button>
          <Button>2</Button>
          <Button>3</Button>
          <Button>4</Button>
        </Space>
      )
    }
  ]
}
